import Vue from 'vue'
import Router from 'vue-router'
import VueRouter from'vue-router'
Vue.use(Router)
import Index from"@/components/index"
import warehouse from "@/components/warehouse/warehouse";
import position from "@/components/warehouse/position";
import login from "@/components/user/login";

import goods from "@/components/warehouse/goods";
const router = new VueRouter({
    routes:[
        {
            path:'/index',
            component:Index

        },
        {
            path:'/warehouse',
            component:warehouse

        },
        {
            path:'/position',
            component:position
        },
        {
            path:'/login',
            component:login
        },
        {
            path:'/goods',
            component:goods
        }
    ]
})
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err);
};
export default router